/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "news_contenttitle")
//@NamedQueries({@NamedQuery(name = "NewsContenttitle.findAll", query = "SELECT n FROM NewsContenttitle n"), @NamedQuery(name = "NewsContenttitle.findByCid", query = "SELECT n FROM NewsContenttitle n WHERE n.cid = :cid"), @NamedQuery(name = "NewsContenttitle.findByContenttitle", query = "SELECT n FROM NewsContenttitle n WHERE n.contenttitle = :contenttitle"), @NamedQuery(name = "NewsContenttitle.findByContenticon", query = "SELECT n FROM NewsContenttitle n WHERE n.contenticon = :contenticon"), @NamedQuery(name = "NewsContenttitle.findByContenttext", query = "SELECT n FROM NewsContenttitle n WHERE n.contenttext = :contenttext"), @NamedQuery(name = "NewsContenttitle.findByNote", query = "SELECT n FROM NewsContenttitle n WHERE n.note = :note"), @NamedQuery(name = "NewsContenttitle.findByContentsource", query = "SELECT n FROM NewsContenttitle n WHERE n.contentsource = :contentsource"), @NamedQuery(name = "NewsContenttitle.findByNewstype", query = "SELECT n FROM NewsContenttitle n WHERE n.newstype = :newstype"), @NamedQuery(name = "NewsContenttitle.findByContenthtml", query = "SELECT n FROM NewsContenttitle n WHERE n.contenthtml = :contenthtml")})
public class NewsContenttitle implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "cid")
    private Integer cid;
    @Column(name = "contenttitle")
    private String contenttitle;
    @Column(name = "contenticon")
    private Integer contenticon;
    @Column(name = "contenttext")
    private String contenttext;
    @Column(name = "note")
    private String note;
    @Column(name = "contentsource")
    private String contentsource;
    @Column(name = "newstype")
    private String newstype;
    @Column(name = "contenthtml")
    private String contenthtml;
    @Column(name = "allow_scoring")
    private Integer allowScoring;
    @Column(name = "allow_comments")
    private Integer allowComments;
    @Column(name = "updatetime")
    private Date updatetime;
    @Column(name = "contentsummary")
    private String contentsummary;
    @Column(name = "weburl")
    private String weburl;
    
   

	@ManyToMany(mappedBy = "newsContenttitleSet")
    private Set<NewsResources> newsResourcesSet;
   
    private String contentid;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "newsContenttitle")
    private Set<NewsExtendsChannelTitle> newsExtendsChannelTitleSet;

    public NewsContenttitle() {
    }

    public NewsContenttitle(Integer cid) {
        this.cid = cid;
    }

    public String getWeburl() {
		return weburl;
	}

	public void setWeburl(String weburl) {
		this.weburl = weburl;
	}
	
    public Integer getCid() {
        return cid;
    }

    public void setCid(Integer cid) {
        this.cid = cid;
    }

    public String getContenttitle() {
        return contenttitle;
    }

    public void setContenttitle(String contenttitle) {
        this.contenttitle = contenttitle;
    }

    public Integer getContenticon() {
        return contenticon;
    }

    public void setContenticon(Integer contenticon) {
        this.contenticon = contenticon;
    }

    public String getContenttext() {
        return contenttext;
    }

    public void setContenttext(String contenttext) {
        this.contenttext = contenttext;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getContentsource() {
        return contentsource;
    }

    public void setContentsource(String contentsource) {
        this.contentsource = contentsource;
    }

    public String getNewstype() {
        return newstype;
    }

    public void setNewstype(String newstype) {
        this.newstype = newstype;
    }

    public String getContenthtml() {
        return contenthtml;
    }

    public void setContenthtml(String contenthtml) {
        this.contenthtml = contenthtml;
    }

    public Integer getAllowScoring() {
		return allowScoring;
	}

	public void setAllowScoring(Integer allowScoring) {
		this.allowScoring = allowScoring;
	}

	public Integer getAllowComments() {
		return allowComments;
	}

	public void setAllowComments(Integer allowComments) {
		this.allowComments = allowComments;
	}

	public Set<NewsResources> getNewsResourcesSet() {
        return newsResourcesSet;
    }

    public void setNewsResourcesSet(Set<NewsResources> newsResourcesSet) {
        this.newsResourcesSet = newsResourcesSet;
    }

    public String getContentid() {
        return contentid;
    }

    public void setContentid(String contentid) {
        this.contentid = contentid;
    }

    public Set<NewsExtendsChannelTitle> getNewsExtendsChannelTitleSet() {
        return newsExtendsChannelTitleSet;
    }

    public void setNewsExtendsChannelTitleSet(Set<NewsExtendsChannelTitle> newsExtendsChannelTitleSet) {
        this.newsExtendsChannelTitleSet = newsExtendsChannelTitleSet;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cid != null ? cid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NewsContenttitle)) {
            return false;
        }
        NewsContenttitle other = (NewsContenttitle) object;
        if ((this.cid == null && other.cid != null) || (this.cid != null && !this.cid.equals(other.cid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.NewsContenttitle[cid=" + cid + "]";
    }

	/**
	 * updatetime
	 *
	 * @return  the updatetime
	 * @since   CodingExample Ver(编码范例查看) 1.0
	 */
	
	public Date getUpdatetime() {
		return updatetime;
	}

	/**
	 * @param updatetime the updatetime to set
	 */
	public void setUpdatetime(Date updatetime) {
		this.updatetime = updatetime;
	}

	/**
	 * contentsummary
	 *
	 * @return  the contentsummary
	 * @since   CodingExample Ver(编码范例查看) 1.0
	 */
	
	public String getContentsummary() {
		return contentsummary;
	}

	/**
	 * @param contentsummary the contentsummary to set
	 */
	public void setContentsummary(String contentsummary) {
		this.contentsummary = contentsummary;
	}

}
